package org.knot.autojmx.metadata;

import java.lang.reflect.Field;

import javax.management.MBeanNotificationInfo;

/**
 * 
 * NotificationField
 * 
 * @author <a href="mailto:yuxiaoweimail@gmail.com">yuxiaowei</a>
 *
 */
public class NotificationField {
 
    private String m_name;
    
    private String m_description;
     
    private Field m_field;
    
    public NotificationField(String name, Field field, String description) {
        this.m_name = name;
        this.m_field = field;
        this.m_description = description;
    }

    public MBeanNotificationInfo getNotificationInfo() {
        String[] notificationTypes = new String[1];
        notificationTypes[0] = m_field.getName();
        MBeanNotificationInfo mbni = new MBeanNotificationInfo(
            notificationTypes, m_name, m_description);
        return mbni;
    }
    }
